파이썬 패키지 설치 방법

패키지 관리자

  • conda: Ananconda 에서 제공하는 패키지 관리자
  • pip: Python 기본 패키지 관리자

conda를 이용한 패키지 설치

$ conda install seaborn
Fetching package metadata: ....
Solving package specifications: ...................................
Package plan for installation in environment C:\Anaconda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    seaborn-0.6.0              |      np110py27_0         248 KB

The following NEW packages will be INSTALLED:

    seaborn: 0.6.0-np110py27_0

Proceed ([y]/n)?

Fetching packages ...
seaborn-0.6.0- 100% |###############################| Time: 0:00:01 155.53 kB/s
Extracting packages ...
[      COMPLETE      ]|##################################################| 100%
Linking packages ...
[      COMPLETE      ]|##################################################| 100%

pip를 이용한 패키지 설치

$ pip install quandl
Collecting quandl
  Downloading Quandl-3.0.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in ./anaconda2/lib/python2.7/site-packages (from quandl)
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in ./anaconda2/lib/python2.7/site-packages (from quandl)
Collecting more-itertools (from quandl)
  Downloading more-itertools-2.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six in ./anaconda2/lib/python2.7/site-packages (from quandl)
Collecting ndg-httpsclient (from quandl)
  Downloading ndg_httpsclient-0.4.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8 in ./anaconda2/lib/python2.7/site-packages (from quandl)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in ./anaconda2/lib/python2.7/site-packages (from quandl)
Requirement already satisfied (use --upgrade to upgrade): pandas>=0.14 in ./anaconda2/lib/python2.7/site-packages (from quandl)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.7.0 in ./anaconda2/lib/python2.7/site-packages (from quandl)
Collecting inflection>=0.3.1 (from quandl)
  Downloading inflection-0.3.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): cryptography>=0.7 in ./anaconda2/lib/python2.7/site-packages (from pyOpenSSL->quandl)
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in ./anaconda2/lib/python2.7/site-packages (from pandas>=0.14->quandl)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in ./anaconda2/lib/python2.7/site-packages (from cryptography>=0.7->pyOpenSSL->quandl)
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in ./anaconda2/lib/python2.7/site-packages/setuptools-20.6.7-py2.7.egg (from cryptography>=0.7->pyOpenSSL->quandl)
Requirement already satisfied (use --upgrade to upgrade): enum34 in ./anaconda2/lib/python2.7/site-packages (from cryptography>=0.7->pyOpenSSL->quandl)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in ./anaconda2/lib/python2.7/site-packages (from cryptography>=0.7->pyOpenSSL->quandl)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in ./anaconda2/lib/python2.7/site-packages (from cryptography>=0.7->pyOpenSSL->quandl)
Requirement already satisfied (use --upgrade to upgrade): pycparser in ./anaconda2/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography>=0.7->pyOpenSSL->quandl)
Building wheels for collected packages: more-itertools, ndg-httpsclient, inflection
  Running setup.py bdist_wheel for more-itertools ... done
  Stored in directory: /home/joel/.cache/pip/wheels/1e/74/ea/935c038db0e8a7077c66d5da0d9b6981daee2bebb991fa1794
  Running setup.py bdist_wheel for ndg-httpsclient ... done
  Stored in directory: /home/joel/.cache/pip/wheels/c9/88/f1/348d5ec506bef5a2a8351243028289a7bb9513b8dd8bbf1c14
  Running setup.py bdist_wheel for inflection ... done
  Stored in directory: /home/joel/.cache/pip/wheels/41/fa/e9/2995f4ab121e9f30f342fa2d43f0b27f851a0cb9f0d98d3b45
Successfully built more-itertools ndg-httpsclient inflection
Installing collected packages: more-itertools, ndg-httpsclient, inflection, quandl
Successfully installed inflection-0.3.1 more-itertools-2.2 ndg-httpsclient-0.4.0 quandl-3.0.0